﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SPCFMedicineInformer.UserControls
{
    public partial class SearchBox : System.Web.UI.UserControl
    {
        public bool IsAuthenticated { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            
                IsAuthenticated = HttpContext.Current.User.Identity.IsAuthenticated;
       
            
        }
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            var query = txtSearch.Text.ToString() == "search medicine" ? "" : txtSearch.Text;
            Response.Redirect("/medicines?query=" + query + "&ib=1&ig=1");
        }
    }
}